package com.dayuanit.atm.controller;

import com.dayuanit.atm.util.ExcelUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;

@Controller
public class ExcelController extends BaseController {

    @RequestMapping("/user/uploadExcel")
    public void uploadExcel(@RequestParam("excel") MultipartFile excel, String note,HttpServletRequest request, HttpSession session) {

        System.out.println("note=" + note);
        try {
            ExcelUtils.processExcel(excel.getInputStream());
        } catch (Exception e) {

        }
    }
}
